package com.hp.service.impl;

import com.hp.mapper.AnnouncementMapper;
import com.hp.entity.Announcement;
import com.hp.service.AnnouncementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AnnouncementServiceImpl implements AnnouncementService {

    @Autowired
    private AnnouncementMapper announcementDao;


    @Override
    public List<Announcement> list(Announcement announcement) {
        return announcementDao.list(announcement);
    }

    @Override
    public int add(Announcement announcement) {
        return announcementDao.add(announcement);
    }

    @Override
    public int del(Integer id) {
        return announcementDao.del(id);
    }

    @Override
    public Announcement findById(Integer id) {
        return announcementDao.findById(id);
    }

    @Override
    public int update(Announcement announcement) {
        return announcementDao.update(announcement);
    }
}
